package com.AO.DAO;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FoodFoodMenuRelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "food_food_menu_relation", catalog = "delicacy")
public class FoodFoodMenuRelation implements java.io.Serializable {

	// Fields

	private Integer id;
	private FoodMenu foodMenu;
	private Food food;
	private Timestamp inputDatetime;

	// Constructors

	/** default constructor */
	public FoodFoodMenuRelation() {
	}

	/** full constructor */
	public FoodFoodMenuRelation(Integer id, FoodMenu foodMenu, Food food,
			Timestamp inputDatetime) {
		this.id = id;
		this.foodMenu = foodMenu;
		this.food = food;
		this.inputDatetime = inputDatetime;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "menu_id", nullable = false)
	public FoodMenu getFoodMenu() {
		return this.foodMenu;
	}

	public void setFoodMenu(FoodMenu foodMenu) {
		this.foodMenu = foodMenu;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food_id", nullable = false)
	public Food getFood() {
		return this.food;
	}

	public void setFood(Food food) {
		this.food = food;
	}

	@Column(name = "inputDatetime", nullable = false, length = 19)
	public Timestamp getInputDatetime() {
		return this.inputDatetime;
	}

	public void setInputDatetime(Timestamp inputDatetime) {
		this.inputDatetime = inputDatetime;
	}

}